/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"570EEABA-0E8B-4896-B64E-F7A27D5D4EEB"}
 */
function volver(event) {
	globals.CerrarForm('turno_dlg_ocupado')
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"49997985-CBDA-479C-B755-DEA188E74897"}
 */
function cancelar(event) {
	if(databaseManager.saveData())
	{	
		globals.CerrarForm('turno_dlg_ocupado')
		controller.deleteRecord()
		forms['calendario'].condicion = 'LIBRE'
		forms['calendario'].paciente = ''
		globals.gDialog('Exito','Turno dado de baja exitosamente','OK','CerrarForm')
	}
	else
	{
		globals.CerrarForm('turno_dlg_ocupado')
		globals.gDialog('Error','La operacion no se pudo completar','OK','CerrarForm')
	}
}
